const express = require('express')
const router = require('./router')
const bodyParser = require('body-parser')
const cors = require('cors')



const app = express();

app.use(express.json({limit: '5mb'}));

app.use(cors())
app.use(bodyParser.urlencoded({extended:true}))

app.use(bodyParser.json())
app.use('/',router)






const server = app.listen(5000,function(){
    const {address,port} = server.address()
    console.log('http启动成功 http://localhost:5000',address,port)
})